from django.urls import path
# from apps.users.views import UsernameCountView
from apps.users.views import RegisterView, LoginView, LogoutView, UserInfoView, EmailView, VerifyEmailView, \
    CreateAddressView, AddressView, UpdateDestroyAddressView, DefaultAddressView, UpdateTitleAddressView, \
    ChangePasswordView, UserBrowseHistory

urlpatterns = [
    # path('usernames/<username:username>/count/',UsernameCountView.as_view()),
    # path('mobiles/<mobile:mobile>/count/',UsernameCountView.as_view()),
    path('register/',RegisterView.as_view()),
    path('login/',LoginView.as_view()),
    path('logout/',LogoutView.as_view()),
    path('info/',UserInfoView.as_view()),
    path('emails/',EmailView.as_view()),
    path('emails/verification/',VerifyEmailView.as_view()),
    path('addresses/create/',CreateAddressView.as_view()),
    path('addresses/',AddressView.as_view()),
    path('addresses/<int:address_id>/',UpdateDestroyAddressView.as_view(), name='address-detail'),
    path('addresses/<int:address_id>/default/',DefaultAddressView.as_view()),
    path('addresses/<int:address_id>/title/',UpdateTitleAddressView.as_view()),
    path('password/',ChangePasswordView.as_view()),
    path('browse_histories/',UserBrowseHistory.as_view()),

]